package ooday01;
/** 学生类的测试 */
public class StudenTest {
    public static void main(String[] args) {
        //创建一个学生对象, 引用Student的类
        Student zg = new Student();
        //访问学生变量
        zg.name="张光";
        zg.age=22;
        zg.className = "jsd2408";
        zg.stuId = "001";
        //调用方法, 此方法都在Student的类中
        zg.study();
        zg.sayHi();
        zg.playWith("李林");

        Student ll = new Student();
        ll.name = "李林";
        ll.age=25;
        ll.className = "jsd2408";
        ll.stuId = "002";
        ll.study();
        ll.sayHi();
        ll.playWith("张光");

        //当不输入值时, 系统会给默认值String的默认值为null
        Student zl = new Student();
        zl.study();
        zl.sayHi();
        zl.playWith("张光");

    }

}
